package org.s45.erp.api;

import org.s45.erp.common.pojo.entities.DepotHead;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;

@FeignClient(contextId = "remoteDepotHeadService",
        name = "jshERP-boot",
        path = "/api/depotHead")
public interface RemoteDepotHeadService {

    @GetMapping("/getAccountSum")
    public BigDecimal getAccountSum(@RequestParam(name = "accountId", required = false) Long accountId,
                                    @RequestParam("timeStr") String timeStr,
                                    @RequestParam("type") String type);
    @GetMapping("/getManyAccountSum")
    public BigDecimal getManyAccountSum(@RequestParam("accountId") Long accountId,
                                        @RequestParam("timeStr") String timeStr,
                                        @RequestParam("type") String type);

    @GetMapping("/getDepotHeadListByAccountIds")
    public List<DepotHead> getDepotHeadListByAccountIds(@RequestParam("accountIds") String[] accountIds);

    @GetMapping("/getDepotHead")
    public DepotHead getDepotHead(@RequestParam("number") String number);

    @GetMapping("/getByAccountId")
    public List<DepotHead> getByAccountId(@RequestParam(name = "accountId", required = false) Long accountId);
}
